Telegram Group & Telegram Channel
🧠 Как кэш CPU влияет на производительность кода на Python?

Лукас Аткинсон провёл эксперименты, чтобы выяснить, как поведение кэша процессора сказывается на времени выполнения кода на Python. Результаты оказались неожиданными.

🔍 Основные выводы:

- Последовательный доступ к спискам происходит быстрее, чем случайный
- При 200 тысячах элементов случайный доступ замедляется на 47%
- При 1.6 миллионах элементов — почти в 4 раза
- Python подвержен влиянию низкоуровневых аспектов памяти, включая кэш CPU

💡 Рекомендация: при работе с большими объёмами данных лучше использовать последовательный доступ — это действительно ускоряет код.

📖 Узнать больше: lukasatkinson.de (https://lukasatkinson.de/2024/python-cpu-caching/)

@Python_Community_ru



tg-me.com/Python_Community_ru/2560
Create:
Last Update:

🧠 Как кэш CPU влияет на производительность кода на Python?

Лукас Аткинсон провёл эксперименты, чтобы выяснить, как поведение кэша процессора сказывается на времени выполнения кода на Python. Результаты оказались неожиданными.

🔍 Основные выводы:

- Последовательный доступ к спискам происходит быстрее, чем случайный
- При 200 тысячах элементов случайный доступ замедляется на 47%
- При 1.6 миллионах элементов — почти в 4 раза
- Python подвержен влиянию низкоуровневых аспектов памяти, включая кэш CPU

💡 Рекомендация: при работе с большими объёмами данных лучше использовать последовательный доступ — это действительно ускоряет код.

📖 Узнать больше: lukasatkinson.de (https://lukasatkinson.de/2024/python-cpu-caching/)

@Python_Community_ru

BY Python Community




Share with your friend now:
tg-me.com/Python_Community_ru/2560

View MORE
Open in Telegram


Python Community Telegram | DID YOU KNOW?

Date: |

Export WhatsApp stickers to Telegram on iPhone

You can’t. What you can do, though, is use WhatsApp’s and Telegram’s web platforms to transfer stickers. It’s easy, but might take a while.Open WhatsApp in your browser, find a sticker you like in a chat, and right-click on it to save it as an image. The file won’t be a picture, though—it’s a webpage and will have a .webp extension. Don’t be scared, this is the way. Repeat this step to save as many stickers as you want.Then, open Telegram in your browser and go into your Saved messages chat. Just as you’d share a file with a friend, click the Share file button on the bottom left of the chat window (it looks like a dog-eared paper), and select the .webp files you downloaded. Click Open and you’ll see your stickers in your Saved messages chat. This is now your sticker depository. To use them, forward them as you would a message from one chat to the other: by clicking or long-pressing on the sticker, and then choosing Forward.

How To Find Channels On Telegram?

There are multiple ways you can search for Telegram channels. One of the methods is really logical and you should all know it by now. We’re talking about using Telegram’s native search option. Make sure to download Telegram from the official website or update it to the latest version, using this link. Once you’ve installed Telegram, you can simply open the app and use the search bar. Tap on the magnifier icon and search for a channel that might interest you (e.g. Marvel comics). Even though this is the easiest method for searching Telegram channels, it isn’t the best one. This method is limited because it shows you only a couple of results per search.

Python Community from cn


Telegram Python Community
FROM USA